"""Definition of the eventtopic content type
"""

from zope.interface import implements

try:
    from Products.LinguaPlone import public as atp
except ImportError:
    # No multilingual support
    from Products.Archetypes import atapi as atp
#from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata
from Products.ATContentTypes.content import topic
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-

from my315ok.researchevent.interfaces import Ieventtopic
from my315ok.researchevent.config import PROJECTNAME

eventtopicSchema = topic.ATTopicSchema.copy() + atp.Schema((

    # -*- Your Archetypes field definitions here ... -*-

))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

eventtopicSchema['title'].storage = atp.AnnotationStorage()
eventtopicSchema['description'].storage = atp.AnnotationStorage()

schemata.finalizeATCTSchema(
    eventtopicSchema,
    folderish=True,
    moveDiscussion=False
)


class eventtopic(topic.ATTopic):
    """A topic for research events"""
    implements(Ieventtopic)

    meta_type = "eventtopic"
    schema = eventtopicSchema

    title = atp.ATFieldProperty('title')
    description = atp.ATFieldProperty('description')

    # -*- Your ATSchema to Python Property Bridges Here ... -*-

atp.registerType(eventtopic, PROJECTNAME)
